home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgets / radio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.4 KB  |  62 lines

  1. // $Id: radio.h 1.3 1997/09/17 08:17:06 dlorre Exp dlorre $
  2. #ifndef CLASS_RADIO_H
  3. #define CLASS_RADIO_H
  4.  
  5. #ifndef EXEC_TYPES_H
  6. #include <exec/types.h>
  7. #endif
  8.  
  9. #if !defined( UTILITY_TAGITEM_H )
  10. #include <utility/tagitem.h>
  11. #endif
  12.  
  13. #ifndef CLASS_WINDOW_H
  14. class window ;
  15. #endif
  16.  
  17. #ifndef CLASS_GADGETLIST_H
  18. class gadgetlist ;
  19. #endif
  20.  
  21. #ifndef CLASS_GAGDET_H
  22. #include "gadgets/gadget.h"
  23. #endif
  24.  
  25.  
  26. #define ORADIO_Base         (TAG_USER+100)
  27. #define ORADIO_Active       (ORADIO_Base+0)
  28. #define ORADIO_Flags        (ORADIO_Base+1)
  29. #define ORADIO_Spacing      (ORADIO_Base+2)
  30. #define ORADIO_Text         (ORADIO_Base+3)
  31. #define ORADIO_TextArray    (ORADIO_Base+4)
  32.  
  33.  
  34. // ========================================================================
  35. // ==========================  RADIO CLASS ================================
  36. // ========================================================================
  37.  
  38.  
  39. class radio : public gadget
  40. {
  41.     STRPTR *mxlabs ;
  42.     LONG   labsize ;
  43.     LONG    spacing ;
  44. public:
  45.     LONG cursel ;
  46.     STRPTR curstring ;
  47.     radio(gadgetlist *gl,
  48.           void (window::*func)(gadget *, unsigned long, unsigned short),
  49.           TagItem *tags) ;
  50.  
  51.     radio(gadgetlist *gl,
  52.           void (window::*func)(gadget *, unsigned long, unsigned short),
  53.           ULONG tag1, ...) ;
  54.  
  55.     ~radio() ;
  56.     void init(TagItem *tags) ;
  57.     void action(unsigned long, unsigned short) ;
  58.     void keystroke(BOOL shifted) ;
  59. };
  60.  
  61. #endif
  62.